<?php
namespace app\admin\model;
use app\admin\model\CmppServerRegCenter as CmppServerRegCenterModel;
use think\Model;
use think\Db;

class ChannelCmpp extends Model
{
    // 设置当前模型对应的完整数据表名称
    protected $table = 'bus_channel_cmpp';

    /**
     * 添加
     */
    public function addDataOne($data)
    {
        return $this->allowField(['channel_id', 'sp_id', 'sp_pwd', 'reg_id', 'ip', 'port', 'sms_limit', 'onoff', 'service_id', 'msg_src', 'src_id', 'time'])->save($data);
    }

    /**
     * 更新
     */
    public function updateDataOne($data, $where)
    {
        return $this->allowField(['sp_id', 'sp_pwd', 'reg_id', 'ip', 'port', 'sms_limit', 'onoff', 'service_id', 'msg_src', 'src_id'])->save($data, $where);
    }

}